package iosr11.gbase.dao;

import iosr11.contact.dao.ContactsHelper;

import java.net.URL;

import com.google.api.gbase.client.GoogleBaseEntry;
import com.google.api.gbase.client.GoogleBaseFeed;
import com.google.api.gbase.client.GoogleBaseQuery;

public interface DAOLocator {
	//public Object getDAO(Class entity);
	
	public ContactsHelper getContactsDAO();
	public boolean authenticate (String username, String password);
	public boolean addRecord(GoogleBaseEntry entry);
	public String addRecordReturnId(GoogleBaseEntry entry);
	public GoogleBaseEntry getRecord(URL url);
	public GoogleBaseEntry getRecord(String id);
	public GoogleBaseFeed getGoogleBaseQueryResult(GoogleBaseQuery query);
	public GoogleBaseFeed getGoogleBaseQueryResult(GoogleBaseQuery query, String key, String value);
	public GoogleBaseFeed getGoogleBaseQueryResultByRef(String key, String value);
	public GoogleBaseFeed selectByKey(GoogleBaseFeed feed, String key, String value);
	public GoogleBaseFeed selectByType(GoogleBaseFeed feed, String type);
	
	public boolean deleteRecord(String id);
	public boolean updateRecord(GoogleBaseEntry old_entry, GoogleBaseEntry new_entry);
}
